<template>
  <el-dialog :title="cateForm.cat_id ? '修改分类' : '添加分类'" :visible.sync="cateDialogVisible" width="50%"
    @close="closeDialogHandle">
    <!-- 添加分类表单 -->
    <el-form :model="cateForm" :rules="cateFormRules" ref="cateFormRuleForm" label-width="100px">
      <el-form-item label="分类名称" prop="cat_name">
        <el-input v-model="cateForm.cat_name"></el-input>
      </el-form-item>
      <el-form-item label="父级分类">
        <el-cascader @change="parentChange" v-model="selectedKeys" :options="parents" :props="props" ref="cascadeRef"
          class="my" clearable></el-cascader>
      </el-form-item>
    </el-form>
    <span slot="footer" class="dialog-footer">
      <el-button @click="resetForm">重置</el-button>
      <el-button @click="cateDialogVisible = false">取 消</el-button>
      <el-button type="primary" @click="cateSubmit">确 定</el-button>
    </span>
  </el-dialog>
</template>

<script>
import CateEdit from './edit'
export default {
  ...CateEdit
}
</script>

<style lang="scss" scoped></style>